<form id="add-form" class="form-horizontal col-sm-12" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id}">
    <div class="form-group">

        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label>配送方式:</label>
                {:build_radios('row[type]', ['物流配送'=>'物流配送', '送货上门'=>'送货上门'])}

            </div>
        </div>

        <div id="songhuo" style="display: none">
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    <label for="c-company">物流公司:</label>
                    <input id="c-company" class="form-control" placeholder="物流公司" name="row[company]"
                           type="text">
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    <label for="c-money">送货费用:</label>
                    <input id="c-money" class="form-control" placeholder="送货费用" name="row[money]"
                           type="text">
                </div>
            </div>
        </div>
        <div id="wuliu">
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    <label for="c-consignee">物流单号:</label>
                    <input id="c-consignee" class="form-control" placeholder="物流单号" name="row[number]"
                           type="text">
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    注：填写发货人/收货人手机尾号(后四位)二选一即可
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    <label for="c-sender_phone">发货人手机尾号:</label>
                    <input id="c-sender_phone" class="form-control" placeholder="发货人手机尾号"
                           name="row[sender_phone]" type="text">
                </div>
            </div>
            <div class="col-xs-12 col-sm-6">
                <div class="form-group col-sm-10">
                    <label for="c-receiver_phone">收货人手机尾号:</label>
                    <input id="c-receiver_phone" class="form-control" placeholder="收货人手机尾号"
                           name="row[receiver_phone]" type="text">
                </div>
            </div>
        </div>

        <div class="col-xs-12 col-sm-10">
            <div class="form-group col-sm-10">
                <label>凭证:</label>
                <div class="input-group">
                    <input id="c-files" class="form-control" size="50" name="row[file_ids]" type="text" value="">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload"
                                      data-input-id="c-files"
                                      data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                      data-multiple="true" data-preview-id="p-collection_img"
                                      data-url="qingdongams/base/upload"><i class="fa fa-upload"></i> 上传</button></span>

                    </div>
                    <span class="msg-box n-right" for="c-files"></span>
                </div>
                <ul class="row list-inline plupload-preview" id="p-collection_img"></ul>
            </div>
        </div>
        {if condition="$row.workorder_type == '产品发货'"}
        <div class="col-xs-12 col-sm-6">
            <div class="form-group col-sm-10">
                <label for="c-product_ids">发货产品:</label>
                <input id="c-product_ids"data-rule="required"  data-source='{$row.customer_product}'
                       class="form-control selectpage" data-multiple="true" name="row[product_ids]" type="text"
                       value="{$row.product_ids}">
            </div>
        </div>
        {/if}
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
